1. Field of the Invention
The present invention relates to systems and methods of displaying and editing data files, and in particular to a method and system for defining, displaying, and performing set operations on multiple subsets of data records.
2. Description of the Related Art
The Virtual Storage Access Method (VSAM) is a method for accessing data using a B+ tree organizational structure. VSAM data files include one or more VSAM data records, each with a plurality of data fields. VSAM data fields are editable by VSAM data editors. Typically, VSAM data records are presented to the user by reading them out of the VSAM data files and storing them in cache. A data formatter then operates on the cached data to associate each data record with a mark or a structure that points to the record (such as a record identifier or ID) in the file. To implement intelligent caching, data formatters are capable of identifying data records that will be retained and stored to the file, by placing appropriate marks in the file cache records.
In some circumstances, it is desirable to define a subset of data records for viewing, analysis and editing, rather than the entire set, and to save that subset for later use. For example, rather than view all of the records in the data file, the user may want to view and edit only those records which having certain entry value criteria (i.e. personal data records including an entry of 60145 for the zip code field) or data criteria (i.e. data entered in the preceding two days). This ability would allow the user to focus more directly on data fields of interest. Unfortunately, depending on how it is defined, the subset""s size may approach that of the entire VSAM data file, and easily exceed the cache memory size.
It is also desirable to allow operations between defined data subsets. For example, the user may want to view and edit all data records entered in the preceding two days and for which the zip code entry is 60145.
As can be seen from the foregoing, there is a need to provide for defining arbitrary subsets of data records in a data file or files and for performing operations on these subsets without exceeding the cache capabilities of the datafile editor. The multiple data subset editor of the present invention satisfies that need.
To address the requirements described above, the present invention discloses a method, apparatus, article of manufacture, and a memory structure for defining and displaying data subsets formed from a file of data records.
Data subsets are defined, and a data subset object is created that includes a list of Record IDs identifying data records that are members of the defined data subset. The data subset object belongs to a Set ID class having a Record ID subclass and a subset subclass. If the Set ID class is instantiated as a subset subclass, the data records listed in the Record ID list are retrieved incrementally, according to the Record ID list. If the Set ID class is instantiated as a Record ID subclass, data records are incrementally retrieved from the data file. The article of manufacture comprises a data storage device tangibly embodying instructions to perform the method steps described above.
The apparatus comprises a means for creating a data subset object having a list of Record IDs identifying data records that are members of the data subset, and a means for incrementally retrieving the data records listed in the list of Record IDs. The data subset object belongs to a Set ID class having a Record ID subclass and a subset subclass. The data records listed in the Record ID list are incrementally retrieved when the Set ID class is instantiated as a subset subclass and incrementally retrieved records from a file of data records when the Set ID class is instantiated as a Record ID subclass.
The foregoing can be used to define multiple data subsets and to perform operations on those subsets to define additional data subsets. Additional data subsets can be defined with the use of a second search or find command describing a second search criteria, or may be defined by applying a search or find command specifying a search criteria to data subsets already created. Once multiple data subsets have been defined, set relationships between the subsets can be used to define additional data subsets.
This ability to define and perform operations involving two or more subsets has several advantages. First, the present invention alleviates the need for the user to compose and enter complex Boolean search strings. Hence, the present invention requires less display real estate and reduces the likelihood that the user will make errors. Second, the present invention allows the user to look at a subset instead of a file to compose the second search criteria. This is beneficial because a subset is ordinarily much smaller than a file, and because the records of interest are more likely to be immediately visible (i.e. much less scrolling is required to see a record with field(s) involved in the next search. Third, if re-searching is required, the present invention increases the search speed, because a subset can be searched more rapidly than a file. Fourth, the present invention can cache small subsets for later retrieval without having to re-search a large file. Finally, the present invention can perform operations (including Boolean operations) between subsets (or files) to form a third subset.